<?php
/***
 * strpos 和 strrpos 有什么区别
 */
function strpos1() {
	$index = strpos ( "Hello,World", "H" );
	echo $index;
	if ($index) {
		echo "包含改字符";
	}
}
function strpos2() {
	$string = "fuzzySearch(人资,20180101,20180627)";
	$keyword = "fuzzySearch";
	$index = strpos ( $string, $keyword );
	echo $index; // 输出0
}
function strrpos1() {
	$string = "fuzzySearch(人资,20180101,20180627)";
	$keyword = "fuzzySearch";
	$index = strrpos ( $string, $keyword );
	echo $index;
}
function split1() {
	$title = "远程";
	$userId = "litng";
	$sessionId = "123";
	$string = $title . ',,' . $sessionId . ',' . $userId;
	echo $string;
	$datas = preg_split ( '/,/', $string, - 1 );
	var_dump ( $datas );
}
function split2() {
	$string = "litong,男,18";
	$array = preg_split ( "/,/", $string, - 1 );
	var_dump ( $array );
}

split2 ();